﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Windows;
using System.Globalization;
using System.Windows.Media;
using ReporterControlLibrary.Models;

namespace Reporter.Converters
{
    public class ImportNotebookMultiConverter : IMultiValueConverter
    {
        public object Convert(
             object[] values,
             Type targetType,
             object parameter,
             System.Globalization.CultureInfo culture)
        {
            var param = new ImportNotebookParameter();
            foreach (var obj in values)
            {
                if (obj is Project)
                {
                    param.Project = obj as Project;
                }
                if (obj is bool)
                {
                    param.ImportImages = (bool)obj;
                }
            }
            return param;
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
